package com.exam.mapper;



import com.exam.pojo.ComposePaper;
import com.exam.pojo.FillQuestion;
import com.exam.pojo.JudgeQuestion;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface JudgeQuestionMapper {
    /**
     * 根据paperId查询判断题信息
     * @param paperId
     * @return
     */
    List<JudgeQuestion> queryByPaperId(Integer paperId);
    /**
     * 根据questionCreatorId查询判断题信息
     * @param questionCreatorId
     * @return
     */
    List<JudgeQuestion> queryByQuestionCreatorId(Integer questionCreatorId);

    /**
     * 根据查询判断题信息
     * @return
     */
    List<JudgeQuestion> queryAll();

    /**
     * 根据id修改判断题信息
     * @param judgeQuestion
     * @return
     */
    int updateById(JudgeQuestion judgeQuestion);
    /**
     * 根据id删除判断题信息
     * @param id
     * @return
     */
    int deleteById(Integer id);
    /**
     * 新增判断题试题
     * @param judgeQuestion
     * @return
     */
    int insert(JudgeQuestion judgeQuestion);

    /**
     * 根据questionCreatorId查询判断题题库分类及数量
     * @param questionCreatorId
     * @return
     */
    List<ComposePaper> querySubNumByQuestionCreatorId(Integer questionCreatorId);

    /**
     * 查询所有判断题题库分类及数量
     * @return
     */
    List<ComposePaper> querySubNum();

    /**
     * 根据questionCreatorId和科目，随机查询number条判断题的Id
     * @param subject
     * @param number
     * @param questionCreatorId
     * @return
     */
    List<Integer> queryIdBySubjectAndQuestionCreatorId(String subject,Integer number,String questionCreatorId);

    /**
     * 根据科目，随机查询number条判断题的Id
     * @param subject
     * @param number
     * @return
     */
    List<Integer> queryIdBySubject(String subject,Integer number);
}
